#!/usr/bin/python

class IrcNetwork:

	def __init__(self, servers, nicks, targets):
		self.servers = servers
		self.nicks = nicks
		self.targets = targets
	
	def getServer(self):
		result = self.servers.pop(0)
		self.servers.append(result)
		return result
		
	def getNick(self):
		result = self.nicks.pop(0)
		self.nicks.append(result)
		return result
		
	def getTargets(self):
		return self.targets
		
	def auth(self, conn):
		return
		
	def hideIP(self, conn):
		return


#QUAKENET
QUAKENET_AUTHNAME = 'Botija'
QUAKENET_AUTHPASSWORD = ''
		
class Quakenet(IrcNetwork):
	
	def __init__(self, servers, nicks, targets):
		IrcNetwork.__init__(self, servers, nicks, targets)
		self.authname = QUAKENET_AUTHNAME
		self.password = QUAKENET_AUTHPASSWORD
		
	def auth(self, conn):
		conn.privmsg('Q@CServe.quakenet.org', 'auth %s %s' %(self.authname, self.password))
	
	def hideIP(self,conn):
		conn.mode(conn.get_nickname(), "+x")
		